Skip to content

ext/iconv/tests/bug52211.phpt: use per-iconv charset names#22543

Open
orlitzky wants to merge 1 commit into
php:PHP-8.4from
orlitzky:per-iconv-charset
Open

ext/iconv/tests/bug52211.phpt: use per-iconv charset names#22543
orlitzky wants to merge 1 commit into
php:PHP-8.4from
orlitzky:per-iconv-charset

Conversation

@orlitzky

@orlitzky orlitzky commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The charset names used in this test are implementation-specific, and in particular are not known to musl. This causes musl to fall back to utf8, in which the input string is not actually invalid, leading to a failed test. The input string is already invalid in ASCII however, so we solve the general problem by using ASCII as the to/from charset unless the ICONV_IMPL is known to support the originals.

Fixes another one of the failures in #22413

The charset names used in this test are implementation-specific, and
in particular are not known to musl. This causes musl to fall back to
utf8, in which the input string is not actually invalid, leading to
a failed test. The input string is already invalid in ASCII however,
so we solve the general problem by using ASCII as the to/from charset
unless the ICONV_IMPL is known to support the originals.

@LamentXU123 LamentXU123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, cc @youkidearitai just in case :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants